package com.aspose.cells;

import java.util.ArrayList;

class zces {
   private WorksheetCollection c;
   boolean a = false;
   boolean b = false;

   zces(WorksheetCollection var1) {
      this.c = var1;
   }

   zabd a(Cell var1, byte[] var2, int var3) {
      byte[] var4 = var2;
      int var5 = var3;
      this.a = false;
      boolean var7 = false;
      boolean var8 = false;
      int var6;
      int var22;
      int var23;
      if (var2 == null) {
         var4 = var1.v();
         var6 = com.aspose.cells.b.a.zc.a(var4, 0);
         var5 = 4;
         var22 = var5 + var6;
         var23 = var22 + 4;
      } else if (var3 == -1) {
         var6 = com.aspose.cells.b.a.zc.a(var2, 0);
         var5 = 4;
         var22 = var5 + var6;
         var23 = var22 + 4;
      } else {
         var23 = var22 = var6 = var2.length;
      }

      ArrayList var9 = new ArrayList();
      zabd var11 = null;

      while(var5 < var22) {
         zabd var10;
         int var12;
         switch(var4[var5]) {
         case 1:
            int var13 = com.aspose.cells.b.a.zc.a(var4, var5 + 1);
            int var14 = zcew.a(var4, var5 + 5);
            Cell var15;
            if (var1.getRow() == var13 && var1.getColumn() == var14) {
               var15 = var1;
            } else {
               var15 = var1.d.getRows().a.a(var13, var14);
            }

            if (var15 != null && var15.D() != null) {
               return this.a(var1, var15.D().d(), -1);
            }

            return null;
         case 2:
         case 26:
         case 27:
         case 46:
         case 47:
         case 48:
         case 49:
         case 50:
         case 51:
         case 52:
         case 53:
         case 54:
         case 55:
         case 56:
         case 62:
         case 63:
         case 78:
         case 79:
         case 80:
         case 81:
         case 82:
         case 83:
         case 84:
         case 85:
         case 86:
         case 87:
         case 88:
         case 94:
         case 95:
         case 110:
         case 111:
         case 112:
         case 113:
         case 114:
         case 115:
         case 116:
         case 117:
         case 118:
         case 119:
         case 120:
         default:
            return null;
         case 3:
            var11 = new zabd(this.c);
            var11.a("+");
            var11.a(new byte[1]);
            var11.f()[0] = 3;
            this.a(var11, var9);
            ++var5;
            if (var9.size() == 0) {
               if (var5 >= var4.length) {
                  return var11;
               }

               com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            } else {
               com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            }
            break;
         case 4:
            var11 = new zabd(this.c);
            var11.a("-");
            var11.a(new byte[1]);
            var11.f()[0] = 4;
            this.a(var11, var9);
            ++var5;
            if (var9.size() == 0) {
               if (var5 >= var4.length) {
                  return var11;
               }

               com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            } else {
               com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            }
            break;
         case 5:
            var11 = new zabd(this.c);
            var11.a("*");
            var11.a(new byte[1]);
            var11.f()[0] = 5;
            this.a(var11, var9);
            ++var5;
            if (var9.size() == 0) {
               if (var5 >= var4.length) {
                  return var11;
               }

               com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            } else {
               com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            }
            break;
         case 6:
            var11 = new zabd(this.c);
            var11.a("/");
            var11.a(new byte[1]);
            var11.f()[0] = 6;
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 7:
            var11 = new zabd(this.c);
            var11.a("^");
            var11.a(new byte[1]);
            var11.f()[0] = 7;
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 8:
            var11 = new zabd(this.c);
            var11.a("&");
            var11.a(new byte[1]);
            var11.f()[0] = 8;
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 9:
            var11 = new zabd(this.c);
            var11.a("<");
            var11.a(new byte[1]);
            var11.f()[0] = 9;
            var11.a(2);
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 10:
            var11 = new zabd(this.c);
            var11.a("<=");
            var11.a(new byte[1]);
            var11.f()[0] = 10;
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 11:
            var11 = new zabd(this.c);
            var11.a("=");
            var11.a(new byte[1]);
            var11.f()[0] = 11;
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 12:
            var11 = new zabd(this.c);
            var11.a(">=");
            var11.a(new byte[1]);
            var11.f()[0] = 12;
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 13:
            var11 = new zabd(this.c);
            var11.a(">");
            var11.a(new byte[1]);
            var11.f()[0] = 13;
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 14:
            var11 = new zabd(this.c);
            var11.a("<>");
            var11.a(new byte[1]);
            var11.f()[0] = 14;
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 15:
            var11 = new zabd(this.c);
            var11.a(" ");
            var11.a(new byte[1]);
            var11.f()[0] = 15;
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 16:
            var11 = new zabd(this.c);
            var11.a(",");
            var11.a(new byte[1]);
            var11.f()[0] = 16;
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 17:
            var11 = new zabd(this.c);
            var11.a(":");
            var11.a(new byte[1]);
            var11.f()[0] = 17;
            this.a(var11, var9);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 18:
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }
            break;
         case 19:
            if (var9.size() < 1) {
               return null;
            }

            var11 = new zabd(this.c);
            var11.a("-");
            var11.a(new byte[1]);
            var11.f()[0] = 19;
            var11.a(2);
            var10 = (zabd)var9.get(var9.size() - 1);
            var10.b(var11);
            var11.a(new ArrayList());
            com.aspose.cells.b.a.a.ze.a(var11.d(), (Object)var10);
            var9.set(var9.size() - 1, var11);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }
            break;
         case 20:
            if (var9.size() < 1) {
               return null;
            }

            var11 = new zabd(this.c);
            var11.a("%");
            var11.a(new byte[1]);
            var11.f()[0] = 20;
            var11.a(2);
            var10 = (zabd)var9.get(var9.size() - 1);
            var10.b(var11);
            var11.a(new ArrayList());
            com.aspose.cells.b.a.a.ze.a(var11.d(), (Object)var10);
            var9.set(var9.size() - 1, var11);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }
            break;
         case 21:
            if (var9.size() < 1) {
               return null;
            }

            var11 = new zabd(this.c);
            var11.a("()");
            var11.a(new byte[1]);
            var11.f()[0] = 21;
            var11.a(2);
            var10 = (zabd)var9.get(var9.size() - 1);
            var10.b(var11);
            var11.a(new ArrayList());
            com.aspose.cells.b.a.a.ze.a(var11.d(), (Object)var10);
            var9.set(var9.size() - 1, var11);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }
            break;
         case 22:
            var11 = new zabd(this.c);
            var11.a(new byte[1]);
            var11.f()[0] = 22;
            var11.a(1);
            ++var5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 23:
            var11 = new zabd(this.c);
            int var16 = (com.aspose.cells.b.a.zc.e(var4, var5 + 1) & '\uffff') * 2 + 3;
            var11.a(new byte[var16]);
            System.arraycopy(var4, var5, var11.f(), 0, var16);
            var5 += var16;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 24:
            if (var4[var5 + 1] == 25) {
               var11 = new zabd(this.c);
               var11.a(new byte[14]);
               System.arraycopy(var4, var5, var11.f(), 0, 14);
               if (var5 >= var4.length) {
                  return var11;
               }

               com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
               var5 += 14;
            } else if (var4[var5 + 1] == 29) {
               var11 = new zabd(this.c);
               var11.a(new byte[6]);
               System.arraycopy(var4, var5, var11.f(), 0, 6);
               if (var5 >= var4.length) {
                  return var11;
               }

               com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
               var5 += 6;
            } else {
               ++var5;
            }
            break;
         case 25:
            if ((var4[var5 + 1] & 255) <= 2) {
               var5 += 4;
            } else {
               int[] var17 = new int[]{var5};
               var11 = this.a(var4, var17, var9, var1);
               var5 = var17[0];
               if (var11 == null) {
                  if (var5 >= var4.length) {
                     return var11;
                  }
               } else {
                  if (var5 >= var4.length) {
                     if (" ".equals(var11.b())) {
                        return (zabd)var9.get(var9.size() - 1);
                     }

                     return var11;
                  }

                  if (!" ".equals(var11.b())) {
                     com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
                  }
               }
            }
            break;
         case 28:
            var11 = new zabd(this.c);
            var11.a(new byte[2]);
            System.arraycopy(var4, var5, var11.f(), 0, 2);
            var5 += 2;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 29:
            var11 = new zabd(this.c);
            var11.a(new byte[2]);
            System.arraycopy(var4, var5, var11.f(), 0, 2);
            var5 += 2;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 30:
            var11 = new zabd(this.c);
            var11.a(new byte[3]);
            System.arraycopy(var4, var5, var11.f(), 0, 3);
            var5 += 3;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 31:
            var11 = new zabd(this.c);
            var11.a(new byte[9]);
            System.arraycopy(var4, var5, var11.f(), 0, 9);
            var5 += 9;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 32:
         case 64:
         case 96:
            var11 = new zabd(this.c);
            var11.a("{}");
            var11.a(new byte[1]);
            var11.f()[0] = 96;
            int[] var18 = new int[]{var23};
            this.a(var11, var4, var5, var18);
            var23 = var18[0];
            var5 += 15;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 33:
         case 65:
         case 97:
            var12 = var9.size();
            var11 = this.a(var4, var5, var9, var1);
            var11.a(new byte[3]);
            System.arraycopy(var4, var5, var11.f(), 0, 3);
            var11.f()[0] = 33;
            var5 += 3;
            if (var5 >= var4.length) {
               return var11;
            }
            break;
         case 34:
         case 66:
         case 98:
            var12 = var9.size();
            var11 = this.b(var4, var5, var9, var1);
            var11.a(new byte[4]);
            System.arraycopy(var4, var5, var11.f(), 0, 4);
            var11.f()[0] = 34;
            var5 += 4;
            if (var5 >= var4.length) {
               return var11;
            }
            break;
         case 35:
         case 67:
         case 99:
            var11 = new zabd(this.c);
            var11.a(new byte[5]);
            System.arraycopy(var4, var5, var11.f(), 0, 5);
            var5 += 5;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 36:
         case 44:
         case 68:
         case 76:
         case 100:
         case 108:
            var11 = new zabd(this.c);
            var11.a(new byte[7]);
            System.arraycopy(var4, var5, var11.f(), 0, 7);
            var5 += 7;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 37:
         case 45:
         case 69:
         case 77:
         case 101:
         case 109:
            var11 = new zabd(this.c);
            var11.a(new byte[13]);
            System.arraycopy(var4, var5, var11.f(), 0, 13);
            var5 += 13;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 38:
         case 70:
         case 102:
            var5 += 7;
            break;
         case 39:
         case 71:
         case 103:
            var5 += 7;
            break;
         case 40:
         case 72:
         case 104:
            var5 += 7;
            break;
         case 41:
         case 73:
         case 105:
            var5 += 3;
            break;
         case 42:
         case 74:
         case 106:
            var11 = new zabd(this.c);
            var11.a(new byte[7]);
            System.arraycopy(var4, var5, var11.f(), 0, 7);
            var5 += 7;
            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 43:
         case 75:
         case 107:
            var11 = new zabd(this.c);
            var11.a(new byte[13]);
            System.arraycopy(var4, var5, var11.f(), 0, 13);
            var5 += 13;
            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 57:
         case 89:
         case 121:
            var11 = new zabd(this.c);
            var11.a(new byte[7]);
            System.arraycopy(var4, var5, var11.f(), 0, 7);
            var5 += 7;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 58:
         case 90:
         case 122:
            var11 = new zabd(this.c);
            var11.a(new byte[9]);
            System.arraycopy(var4, var5, var11.f(), 0, 9);
            if (this.b && var1 != null) {
               int var19 = zcew.a(var11.f(), 3, var1.getRow(), var11.f()[8]);
               int var20 = zcew.b(var11.f(), 7, var1.getColumn(), var11.f()[8]);
               System.arraycopy(com.aspose.cells.b.a.zc.a(var19), 0, var11.f(), 3, 4);
               byte[] var21 = com.aspose.cells.b.a.zc.a(var20);
               var21[1] = (byte)(var21[1] & 255 & 63 | var11.f()[8] & 255 & 192);
               System.arraycopy(var21, 0, var11.f(), 7, 2);
            }

            var5 += 9;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 59:
         case 91:
         case 123:
            var11 = new zabd(this.c);
            var11.a(new byte[15]);
            System.arraycopy(var4, var5, var11.f(), 0, 15);
            var5 += 15;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 60:
         case 92:
         case 124:
            var11 = new zabd(this.c);
            var11.a(new byte[9]);
            System.arraycopy(var4, var5, var11.f(), 0, 9);
            var5 += 9;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
            break;
         case 61:
         case 93:
         case 125:
            var11 = new zabd(this.c);
            var11.a(new byte[15]);
            System.arraycopy(var4, var5, var11.f(), 0, 15);
            var5 += 15;
            if (var5 >= var4.length) {
               return var11;
            }

            com.aspose.cells.b.a.a.ze.a(var9, (Object)var11);
         }
      }

      return var11;
   }

   private zabd a(byte[] var1, int[] var2, ArrayList var3, Cell var4) {
      zabd var5 = new zabd(this.c);
      zabd var6;
      ArrayList var7;
      switch(var1[var2[0] + 1]) {
      case 1:
         var2[0] += 4;
         return null;
      case 2:
         if (var3 != null && var3.size() != 0) {
            var2[0] += 4;
            return null;
         }

         return null;
      case 4:
         var6 = (zabd)var3.get(var3.size() - 1);
         var6.b(var5);
         var7 = new ArrayList();
         com.aspose.cells.b.a.a.ze.a(var7, (Object)var6);
         var5.a(var7);
         var3.remove(var3.size() - 1);
         var5.a(3);
         var5.a("CHOOSE");
         int var9 = com.aspose.cells.b.a.zc.e(var1, var2[0] + 2) & '\uffff';
         int[] var10 = new int[var9 + 1];

         int var11;
         int var12;
         for(var11 = 0; var11 < var9; ++var11) {
            var12 = var2[0] + 4 + 2 * var11;
            var10[var11] = com.aspose.cells.b.a.zc.e(var1, var12) & '\uffff';
         }

         for(var11 = 0; var11 < var9 - 1; ++var11) {
            var12 = var10[var11];
            int var13 = var10[var11 + 1];
            int var14 = var13 - var12 - 4;
            byte[] var8 = new byte[var14];
            System.arraycopy(var1, var2[0] + 4 + var12, var8, 0, var14);
            zabd var15 = this.a(var4, var8, 0);
            com.aspose.cells.b.a.a.ze.a(var5.d(), (Object)var15);
            var15.b(var5);
         }

         var11 = com.aspose.cells.b.a.zc.e(var1, var2[0] + 4 + 2 * var9) & '\uffff';
         var2[0] += var11 + 8;
         return var5;
      case 8:
         var2[0] += 4;
         return null;
      case 16:
         if (var3 != null && var3.size() != 0) {
            var6 = (zabd)var3.get(var3.size() - 1);
            var6.b(var5);
            var7 = new ArrayList();
            com.aspose.cells.b.a.a.ze.a(var7, (Object)var6);
            var5.a(var7);
            var3.remove(var3.size() - 1);
            var5.a(3);
            var5.a("SUM");
            var2[0] += 4;
            return var5;
         }

         return null;
      case 64:
         var5.a(" ");
         var2[0] += 4;
         return var5;
      default:
         var2[0] += 4;
         return null;
      }
   }

   private zabd a(String var1, int var2, ArrayList var3, Cell var4) {
      zabd var5 = new zabd(this.c);
      var5.a(3);
      var5.a(var1);
      ArrayList var6 = new ArrayList();

      int var7;
      for(var7 = var2 - 1; var7 > 0; --var7) {
         zabd var8 = (zabd)var3.get(var3.size() - var7);
         var8.b(var5);
         com.aspose.cells.b.a.a.ze.a(var6, (Object)var8);
      }

      var5.a(var6);

      for(var7 = 0; var7 < var2; ++var7) {
         var3.remove(var3.size() - 1);
      }

      com.aspose.cells.b.a.a.ze.a(var3, (Object)var5);
      return var5;
   }

   private zabd b(String var1, int var2, ArrayList var3, Cell var4) {
      zabd var5 = new zabd(this.c);
      var5.a(3);
      var5.a(var1);
      ArrayList var6 = new ArrayList();

      int var7;
      for(var7 = var2; var7 > 0; --var7) {
         zabd var8 = (zabd)var3.get(var3.size() - var7);
         var8.b(var5);
         com.aspose.cells.b.a.a.ze.a(var6, (Object)var8);
      }

      var5.a(var6);

      for(var7 = 0; var7 < var2; ++var7) {
         var3.remove(var3.size() - 1);
      }

      com.aspose.cells.b.a.a.ze.a(var3, (Object)var5);
      return var5;
   }

   private zabd a(byte[] var1, int var2, ArrayList var3, Cell var4) {
      new zabd(this.c);
      int var6 = com.aspose.cells.b.a.zc.e(var1, var2 + 1);
      switch(var6) {
      case 2:
         return this.b((String)"ISNA", 1, var3, var4);
      case 3:
         return this.b((String)"ISERROR", 1, var3, var4);
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      case 11:
      case 12:
      case 13:
      case 14:
      case 28:
      case 29:
      case 34:
      case 35:
      case 36:
      case 37:
      case 40:
      case 41:
      case 42:
      case 43:
      case 44:
      case 45:
      case 46:
      case 47:
      case 49:
      case 50:
      case 51:
      case 52:
      case 53:
      case 54:
      case 55:
      case 56:
      case 57:
      case 58:
      case 59:
      case 60:
      case 61:
      case 62:
      case 64:
      case 70:
      case 75:
      case 78:
      case 79:
      case 80:
      case 81:
      case 82:
      case 84:
      case 85:
      case 87:
      case 88:
      case 89:
      case 90:
      case 91:
      case 92:
      case 93:
      case 94:
      case 95:
      case 96:
      case 100:
      case 101:
      case 102:
      case 103:
      case 104:
      case 106:
      case 107:
      case 108:
      case 109:
      case 110:
      case 112:
      case 114:
      case 115:
      case 116:
      case 120:
      case 121:
      case 122:
      case 123:
      case 124:
      case 125:
      case 130:
      case 131:
      case 132:
      case 133:
      case 134:
      case 135:
      case 136:
      case 137:
      case 138:
      case 139:
      case 144:
      case 145:
      case 146:
      case 147:
      case 148:
      case 149:
      case 150:
      case 151:
      case 152:
      case 153:
      case 154:
      case 155:
      case 156:
      case 157:
      case 158:
      case 159:
      case 160:
      case 161:
      case 162:
      case 163:
      case 164:
      case 165:
      case 166:
      case 167:
      case 168:
      case 169:
      case 170:
      case 171:
      case 172:
      case 173:
      case 174:
      case 175:
      case 176:
      case 177:
      case 178:
      case 179:
      case 180:
      case 181:
      case 182:
      case 183:
      case 184:
      case 185:
      case 186:
      case 187:
      case 188:
      case 189:
      case 190:
      case 191:
      case 192:
      case 193:
      case 194:
      case 195:
      case 196:
      case 197:
      case 198:
      case 199:
      case 200:
      case 201:
      case 202:
      case 203:
      case 204:
      case 205:
      case 206:
      case 207:
      case 208:
      case 209:
      case 210:
      case 211:
      case 214:
      case 215:
      case 216:
      case 217:
      case 218:
      case 219:
      case 220:
      case 222:
      case 223:
      case 224:
      case 225:
      case 226:
      case 227:
      case 228:
      case 235:
      case 236:
      case 237:
      case 238:
      case 239:
      case 240:
      case 241:
      case 242:
      case 243:
      case 244:
      case 245:
      case 246:
      case 247:
      case 248:
      case 249:
      case 250:
      case 251:
      case 253:
      case 254:
      case 255:
      case 256:
      case 257:
      case 258:
      case 259:
      case 260:
      case 261:
      case 262:
      case 263:
      case 264:
      case 265:
      case 266:
      case 267:
      case 268:
      case 269:
      case 270:
      case 271:
      case 272:
      case 276:
      case 277:
      case 278:
      case 283:
      case 284:
      case 289:
      case 290:
      case 291:
      case 292:
      case 297:
      case 298:
      case 299:
      case 302:
      case 303:
      case 304:
      case 305:
      case 306:
      case 308:
      case 310:
      case 311:
      case 314:
      case 315:
      case 316:
      case 317:
      case 318:
      case 319:
      case 320:
      case 321:
      case 322:
      case 323:
      case 324:
      case 327:
      case 329:
      case 330:
      case 331:
      case 333:
      case 334:
      case 335:
      case 336:
      case 338:
      case 339:
      case 340:
      case 341:
      case 344:
      case 345:
      case 348:
      case 349:
      case 350:
      default:
         zabl var7 = zabl.a(var6 & '\uffff');
         if (var7 != null) {
            return this.b(var7.b, var7.d & 255, var3, var4);
         }

         throw new CellsException(5, "Unsupported function in formula calculation engine - code " + Integer.toString(var6));
      case 10:
         return this.b((String)"NA", 0, var3, var4);
      case 15:
         return this.b((String)"SIN", 1, var3, var4);
      case 16:
         return this.b((String)"COS", 1, var3, var4);
      case 17:
         return this.b((String)"TAN", 1, var3, var4);
      case 18:
         return this.b((String)"ATAN", 1, var3, var4);
      case 19:
         return this.b((String)"PI", 0, var3, var4);
      case 20:
         return this.b((String)"SQRT", 1, var3, var4);
      case 21:
         return this.b((String)"EXP", 1, var3, var4);
      case 22:
         return this.b((String)"LN", 1, var3, var4);
      case 23:
         return this.b((String)"LOG10", 1, var3, var4);
      case 24:
         return this.b((String)"ABS", 1, var3, var4);
      case 25:
         return this.b((String)"INT", 1, var3, var4);
      case 26:
         return this.b((String)"SIGN", 1, var3, var4);
      case 27:
         return this.b((String)"ROUND", 2, var3, var4);
      case 30:
         return this.b((String)"REPT", 2, var3, var4);
      case 31:
         return this.b((String)"MID", 3, var3, var4);
      case 32:
         return this.b((String)"LEN", 1, var3, var4);
      case 33:
         return this.b((String)"VALUE", 1, var3, var4);
      case 38:
         return this.b((String)"NOT", 1, var3, var4);
      case 39:
         return this.b((String)"MOD", 2, var3, var4);
      case 48:
         return this.b((String)"TEXT", 2, var3, var4);
      case 63:
         return this.b((String)"RAND", 0, var3, var4);
      case 65:
         return this.b((String)"DATE", 3, var3, var4);
      case 66:
         return this.b((String)"TIME", 3, var3, var4);
      case 67:
         return this.b((String)"DAY", 1, var3, var4);
      case 68:
         return this.b((String)"MONTH", 1, var3, var4);
      case 69:
         return this.b((String)"YEAR", 1, var3, var4);
      case 71:
         return this.b((String)"HOUR", 1, var3, var4);
      case 72:
         return this.b((String)"MINUTE", 1, var3, var4);
      case 73:
         return this.b((String)"SECOND", 1, var3, var4);
      case 74:
         return this.b((String)"NOW", 0, var3, var4);
      case 76:
         return this.b((String)"ROWS", 1, var3, var4);
      case 77:
         return this.b((String)"COLUMNS", 1, var3, var4);
      case 83:
         return this.b((String)"TRANSPOSE", 1, var3, var4);
      case 86:
         return this.b((String)"TYPE", 1, var3, var4);
      case 97:
         return this.b((String)"ATAN2", 2, var3, var4);
      case 98:
         return this.b((String)"ASIN", 1, var3, var4);
      case 99:
         return this.b((String)"ACOS", 1, var3, var4);
      case 105:
         return this.b((String)"ISREF", 1, var3, var4);
      case 111:
         return this.b((String)"CHAR", 1, var3, var4);
      case 113:
         return this.b((String)"UPPER", 1, var3, var4);
      case 117:
         return this.b((String)"EXACT", 2, var3, var4);
      case 118:
         return this.b((String)"TRIM", 1, var3, var4);
      case 119:
         return this.b((String)"REPLACE", 4, var3, var4);
      case 126:
         return this.b((String)"ISERR", 1, var3, var4);
      case 127:
         return this.b((String)"ISTEXT", 1, var3, var4);
      case 128:
         return this.b((String)"ISNUMBER", 1, var3, var4);
      case 129:
         return this.b((String)"ISBLANK", 1, var3, var4);
      case 140:
         return this.b((String)"DATEVALUE", 1, var3, var4);
      case 141:
         return this.b((String)"TIMEVALUE", 1, var3, var4);
      case 142:
         return this.b((String)"SLN", 3, var3, var4);
      case 143:
         return this.b((String)"SYD", 4, var3, var4);
      case 212:
         return this.b((String)"ROUNDUP", 2, var3, var4);
      case 213:
         return this.b((String)"ROUNDDOWN", 2, var3, var4);
      case 221:
         return this.b((String)"TODAY", 0, var3, var4);
      case 229:
         return this.b((String)"SINH", 1, var3, var4);
      case 230:
         return this.b((String)"COSH", 1, var3, var4);
      case 231:
         return this.b((String)"TANH", 1, var3, var4);
      case 232:
         return this.b((String)"ASINH", 1, var3, var4);
      case 233:
         return this.b((String)"ACOSH", 1, var3, var4);
      case 234:
         return this.b((String)"ATANH", 1, var3, var4);
      case 252:
         return this.b((String)"FREQUENCY", 2, var3, var4);
      case 273:
         return this.b((String)"BINOMDIST", 4, var3, var4);
      case 274:
         return this.b((String)"CHIDIST", 2, var3, var4);
      case 275:
         return this.b((String)"CHIINV", 2, var3, var4);
      case 279:
         return this.b((String)"EVEN", 1, var3, var4);
      case 280:
         return this.b((String)"EXPONDIST", 3, var3, var4);
      case 281:
         return this.b((String)"FDIST", 3, var3, var4);
      case 282:
         return this.b((String)"FINV", 3, var3, var4);
      case 285:
         return this.b((String)"FLOOR", 2, var3, var4);
      case 286:
         return this.b((String)"GAMMADIST", 4, var3, var4);
      case 287:
         return this.b((String)"GAMMAINV", 3, var3, var4);
      case 288:
         return this.b((String)"CEILING", 2, var3, var4);
      case 293:
         return this.b((String)"NORMDIST", 4, var3, var4);
      case 294:
         return this.b((String)"NORMSDIST", 1, var3, var4);
      case 295:
         return this.b((String)"NORMINV", 3, var3, var4);
      case 296:
         return this.b((String)"NORMSINV", 1, var3, var4);
      case 300:
         return this.b((String)"POISSON", 3, var3, var4);
      case 301:
         return this.b((String)"TDIST", 3, var3, var4);
      case 307:
         return this.b((String)"CORREL", 2, var3, var4);
      case 309:
         return this.b((String)"FORECAST", 3, var3, var4);
      case 312:
         return this.b((String)"PEARSON", 2, var3, var4);
      case 313:
         return this.b((String)"RSQ", 2, var3, var4);
      case 325:
         return this.b((String)"LARGE", 2, var3, var4);
      case 326:
         return this.b((String)"SMALL", 2, var3, var4);
      case 328:
         return this.b((String)"PERCENTILE", 2, var3, var4);
      case 332:
         return this.b((String)"TINV", 2, var3, var4);
      case 337:
         return this.b((String)"POWER", 2, var3, var4);
      case 342:
         return this.b((String)"RADIANS", 1, var3, var4);
      case 343:
         return this.b((String)"DEGREES", 1, var3, var4);
      case 346:
         return this.b((String)"COUNTIF", 2, var3, var4);
      case 347:
         return this.b((String)"COUNTBLANK", 1, var3, var4);
      case 351:
         return this.b((String)"DATEDIF", 3, var3, var4);
      }
   }

   private zabd b(byte[] var1, int var2, ArrayList var3, Cell var4) {
      new zabd(this.c);
      byte var6 = var1[var2 + 1];
      if (var6 == 0 || var3 != null && var3.size() >= (var6 & 255)) {
         int var7 = com.aspose.cells.b.a.zc.e(var1, var2 + 2);
         zabd var8;
         switch(var7) {
         case 0:
            return this.b("COUNT", var6 & 255, var3, var4);
         case 1:
            return this.b("IF", var6 & 255, var3, var4);
         case 4:
            return this.b("SUM", var6 & 255, var3, var4);
         case 5:
            return this.b("AVERAGE", var6 & 255, var3, var4);
         case 6:
            return this.b("MIN", var6 & 255, var3, var4);
         case 7:
            return this.b("MAX", var6 & 255, var3, var4);
         case 8:
            var8 = this.b("ROW", var6 & 255, var3, var4);
            if (var4 != null) {
               var8.b(var4.getRow());
            }

            return var8;
         case 9:
            var8 = this.b("COLUMN", var6 & 255, var3, var4);
            if (var4 != null) {
               var8.b(var4.getColumn());
            }

            return var8;
         case 11:
            return this.b("NPV", var6 & 255, var3, var4);
         case 12:
            return this.b("STDEV", var6 & 255, var3, var4);
         case 13:
         case 204:
            return this.b("DOLLAR", var6 & 255, var3, var4);
         case 14:
            return this.b("FIXED", var6 & 255, var3, var4);
         case 28:
            return this.b("LOOKUP", var6 & 255, var3, var4);
         case 29:
            return this.b("INDEX", var6 & 255, var3, var4);
         case 36:
            return this.b("AND", var6 & 255, var3, var4);
         case 37:
            return this.b("OR", var6 & 255, var3, var4);
         case 49:
            return this.b("LINEST", var6 & 255, var3, var4);
         case 50:
            return this.b("TREND", var6 & 255, var3, var4);
         case 51:
            return this.b("LOGEST", var6 & 255, var3, var4);
         case 52:
            return this.b("GROWTH", var6 & 255, var3, var4);
         case 56:
            return this.b("PV", var6 & 255, var3, var4);
         case 57:
            return this.b("FV", var6 & 255, var3, var4);
         case 58:
            return this.b("NPER", var6 & 255, var3, var4);
         case 59:
            return this.b("PMT", var6 & 255, var3, var4);
         case 60:
            return this.b("RATE", var6 & 255, var3, var4);
         case 62:
            return this.b("IRR", var6 & 255, var3, var4);
         case 64:
            return this.b("MATCH", var6 & 255, var3, var4);
         case 70:
            return this.b("WEEKDAY", var6 & 255, var3, var4);
         case 78:
            return this.b("OFFSET", var6 & 255, var3, var4);
         case 82:
            return this.b("SEARCH", var6 & 255, var3, var4);
         case 100:
            return this.b("CHOOSE", var6 & 255, var3, var4);
         case 101:
            return this.b("HLOOKUP", var6 & 255, var3, var4);
         case 102:
            return this.b("VLOOKUP", var6 & 255, var3, var4);
         case 115:
            return this.b("LEFT", var6 & 255, var3, var4);
         case 116:
            return this.b("RIGHT", var6 & 255, var3, var4);
         case 120:
            return this.b("SUBSTITUTE", var6 & 255, var3, var4);
         case 124:
            return this.b("FIND", var6 & 255, var3, var4);
         case 125:
            return this.b("CELL", var6 & 255, var3, var4);
         case 144:
            return this.b("DDB", var6 & 255, var3, var4);
         case 148:
            return this.b("INDIRECT", var6 & 255, var3, var4);
         case 167:
            return this.b("IPMT", var6 & 255, var3, var4);
         case 168:
            return this.b("PPMT", var6 & 255, var3, var4);
         case 169:
            return this.b("COUNTA", var6 & 255, var3, var4);
         case 183:
            return this.b("PRODUCT", var6 & 255, var3, var4);
         case 193:
            return this.b("STDEVP", var6 & 255, var3, var4);
         case 197:
            return this.b("TRUNC", var6 & 255, var3, var4);
         case 216:
            return this.b("RANK", var6 & 255, var3, var4);
         case 219:
            return this.b("ADDRESS", var6 & 255, var3, var4);
         case 220:
            return this.b("DAYS360", var6 & 255, var3, var4);
         case 227:
            return this.b("MEDIAN", var6 & 255, var3, var4);
         case 228:
            return this.b("SUMPRODUCT", var6 & 255, var3, var4);
         case 255:
            var8 = (zabd)var3.get(var3.size() - (var6 & 255));
            byte[] var9 = var8.f();
            int var10;
            if (var9[0] != 35 && var9[0] != 67 && var9[0] != 99) {
               int var16 = com.aspose.cells.b.a.zc.e(var9, 1);
               var10 = com.aspose.cells.b.a.zc.e(var9, 3) & '\uffff';
               int var12 = this.c.q().c(var16 & '\uffff');
               zbqf var13 = this.c.v();
               if (var13 != null && var13.getCount() != 0) {
                  zbqg var14 = var13.a(var12);
                  zuk var15 = (zuk)var14.b().get(var10 - 1);
                  return this.a(var15.e().toUpperCase(), var6 & 255, var3, var4);
               }

               return null;
            }

            var3.remove(var3.size() - (var6 & 255));
            var10 = (com.aspose.cells.b.a.zc.e(var9, 1) & '\uffff') - 1;
            Name var11 = this.c.getNames().get(var10);
            if (!this.a) {
               this.a = zabl.a(var11.getText());
            }

            return this.b(var11.getText(), (var6 & 255) - 1, var3, var4);
         case 270:
            return this.b("BETADIST", var6 & 255, var3, var4);
         case 272:
            return this.b("BETAINV", var6 & 255, var3, var4);
         case 319:
            return this.b("GEOMEAN", var6 & 255, var3, var4);
         case 336:
            return this.b("CONCATENATE", var6 & 255, var3, var4);
         case 344:
            return this.b("SUBTOTAL", var6 & 255, var3, var4);
         case 345:
            return this.b("SUMIF", var6 & 255, var3, var4);
         case 359:
            return this.b("HYPERLINK", var6 & 255, var3, var4);
         case 361:
            return this.b("AVERAGEA", var6 & 255, var3, var4);
         case 362:
            return this.b("MAXA", var6 & 255, var3, var4);
         case 363:
            return this.b("MINA", var6 & 255, var3, var4);
         case 364:
            return this.b("STDEVPA", var6 & 255, var3, var4);
         default:
            zabl var17 = zabl.a(var7 & '\uffff');
            if (var17 != null) {
               return this.b(var17.b, var6 & 255, var3, var4);
            } else {
               throw new CellsException(5, "Unsupported function in formula calculation engine - code " + Integer.toString(var7));
            }
         }
      } else {
         return null;
      }
   }

   private void a(zabd var1, ArrayList var2) {
      var1.a(2);
      ArrayList var4 = new ArrayList();
      zabd var3 = (zabd)var2.get(var2.size() - 2);
      var3.b(var1);
      com.aspose.cells.b.a.a.ze.a(var4, (Object)var3);
      var3 = (zabd)var2.get(var2.size() - 1);
      var3.b(var1);
      com.aspose.cells.b.a.a.ze.a(var4, (Object)var3);
      var2.remove(var2.size() - 1);
      var2.remove(var2.size() - 1);
      var1.a(var4);
   }

   private void a(zabd var1, byte[] var2, int var3, int[] var4) {
      int var5 = com.aspose.cells.b.a.zc.a(var2, var4[0]);
      int var6 = com.aspose.cells.b.a.zc.a(var2, var4[0] + 4);
      var1.a(new ArrayList());
      Object[][] var7 = new Object[var6][];
      com.aspose.cells.b.a.a.ze.a(var1.d(), (Object)var7);
      var4[0] += 8;

      for(int var8 = 0; var8 < var6; ++var8) {
         var7[var8] = new Object[var5];

         for(int var9 = 0; var9 < var5; ++var9) {
            switch(var2[var4[0]]) {
            case 0:
               ++var4[0];
               var7[var8][var9] = com.aspose.cells.b.a.zc.f(var2, var4[0]);
               var4[0] += 8;
               break;
            case 1:
               ++var4[0];
               int var10 = com.aspose.cells.b.a.zc.e(var2, var4[0]) & '\uffff';
               if (var10 != 0) {
                  String var11 = Encoding.getUnicode().a(var2, var4[0] + 2, var10 * 2);
                  var4[0] += 2 + var10 * 2;
                  var7[var8][var9] = var11;
               } else {
                  var7[var8][var9] = "";
                  var4[0] += 2;
               }
               break;
            case 2:
               var7[var8][var9] = var2[var4[0] + 1] == 1;
               var4[0] += 2;
               break;
            case 3:
            default:
               var4[0] += 9;
               break;
            case 4:
               var7[var8][var9] = zsk.a(var2[var4[0] + 1]);
               var4[0] += 5;
            }
         }
      }

   }
}
